package org.smile.auth.response;

import org.smile.auth.AuthUtils;
import org.smile.auth.request.Request;

import javax.servlet.http.HttpServletResponse;

public class HttpResponse implements Response{
    HttpServletResponse response;
    public HttpResponse(HttpServletResponse response){
        this.response=response;
    }
    @Override
    public void setAuthorizationToken(String token) {
        Request request= AuthUtils.getRequest();
        String auth=request.getAuthorization();
        response.setHeader(auth,token);
    }

    @Override
    public void setSessionId(String sessionId) {
        response.setHeader("sessionId",sessionId);
    }
}
